Update cgoflags to support raspbian.#42
Update cgoflags to support raspbian.#42happydig wants to merge 1 commit intogonum:masterfrom happydig:patch-1
Conversation
support install on raspbian.
| // #cgo linux CFLAGS: -I/usr/local/include, -I/usr/lib/x86_64-linux-gnu/hdf5/serial/include | ||
| // #cgo linux LDFLAGS: -L/usr/local/lib, -L/usr/lib/x86_64-linux-gnu/hdf5/serial/ | ||
| // #cgo linux arm CFLAGS: -I/usr/local/include, -I/usr/lib/arm-linux-gnueabihf/hdf5/serial/include/ | ||
| // #cgo linux arm LDFLAGS: -L/usr/local/lib, -L/usr/lib/arm-linux-gnueabihf/hdf5/serial/ |
There was a problem hiding this comment.
ok... perhaps add !arm for the other linux directives? or add amd64?
There was a problem hiding this comment.
I prefer "amd64". or could we use pkg-config directive? as:
package hdf5
// #cgo pkg-config: hdf5-serial
// #cgo LDFLAGS: -lhdf5_hl
// #include "hdf5.h"
import "C"
This passed on my laptops but failed on Travis. Travis failed ot execute 'pkg-config hdf5-serial --cflags" .
There was a problem hiding this comment.
The union of build tag must be 𝑈, so please use !arm in conjunction with arm. If pkg-config works though, that would be the best.
There was a problem hiding this comment.
The status is:
1, On raspbian stretch, libhdf5-dev provides hdf5.pc.
2, On Ubuntu 18.10, libhdf5-dev proides hdf5.pc.
3, On Mac OS homebrew, hdf5 does not provide hdf5.pc. It is due to hdf5 source code without hdf5.pc.
4, On Ubuntu trusty which travis-ci runs, libhdf5-dev does not provide hdf5.pc.
So I will create a pull request with '!arm' option.
Thanks a lot.
support install on raspbian.